package com.stylefeng.guns.rest.modular.App.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.rest.validater.Search;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


 /**
 * 任务信息表
 *
 * @author 张亚林
 * @Date 2018-11-12 17:05
 * @TableField(exist = false) 实现属性与数据库字段不一一对应
 */
 @Data
 @EqualsAndHashCode(callSuper=true)
 @TableName("task_inf")
 @ApiModel(value = "任务信息表DTO",description = "任务信息表DTO")
 public class TaskInf extends Model<TaskInf> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     * 自动生成后修改成实际的主键 
     */
    protected Serializable pkVal() {
        return this.tiId;
    }
    
    //扩展能查询字段
    @TableField(exist = false)
    private String key ;
    //开始日期
    @TableField(exist = false)
    private String sdate;
    //截止日期 
    @TableField(exist = false)
	private String edate;
    //排序字段
    @TableField(exist = false)
	private String  sortField ;
	//排序	
	@TableField(exist = false)
	private String sortOrder;
    //当前页码 从1 开始
    @TableField(exist = false)
    @ApiModelProperty(value="当前页码",name="pageNum",example = "1")
    @NotNull(message = "当前页码不能为空",groups = Search.class)
    private Integer pageNum;
    //每页显示多少条
    @TableField(exist = false)
    @ApiModelProperty(value="每页显示多少条",name="pageSize",example = "1000")
    @NotNull(message = "每页显示多少条不能为空",groups = Search.class)
    private Integer pageSize;
    //执行中的任务
    @TableField(exist = false)
    private String  isExcute;
	
    @ApiModelProperty(value = "任务ID")
    @TableId(value = "ti_id",type = IdType.UUID)
    private String tiId;     //任务ID

    @ApiModelProperty(value = "任务Code")
    @TableField("ti_code")
    private String tiCode;     //

    @ApiModelProperty(value = "乘车人数")
    @TableField("ti_customer_count")
    private Integer tiCustomerCount;     //乘车人数

    @ApiModelProperty(value = "司机ID")
    @TableField("di_id")
    private String diId;     //司机ID

    @ApiModelProperty(value = "司机姓名")
    @TableField("di_name")
    private String diName;     //司机姓名

    @ApiModelProperty(value = "车牌号")
    @TableField("di_vehicle_plate")
    private String diVehiclePlate;     //车牌号

    @ApiModelProperty(value = "驾驶员工号")
    @TableField("di_no")
    private String diNo;     //驾驶员工号

    @ApiModelProperty(value = "车辆编号")
    @TableField("di_vehicle_no")
    private String diVehicleNo;     //车辆编号

    @ApiModelProperty(value = "车队")
    @TableField("di_org")
    private Integer diOrg;     //车队

    @ApiModelProperty(value = "任务生成时间")
    @TableField("create_time")
    private Date createTime;     //任务生成时间

    @ApiModelProperty(value = "创建人")
    @TableField("create_user")
    private String createUser;     //创建人

    @ApiModelProperty(value = "抢单/派单时间")
    @TableField("ti_task_get_time")
    private Date tiTaskGetTime;     //抢单/派单时间

    @ApiModelProperty(value = "执行时间")
    @TableField("ti_start_time")
    private Date tiStartTime;     //执行时间

    @ApiModelProperty(value = "任务结束时间")
    @TableField("ti_end_time")
    private Date tiEndTime;     //任务结束时间

    @ApiModelProperty(value = "司机执行位置经纬度")
    @TableField("ti_start_point")
    private String tiStartPoint;     //司机执行位置经纬度

    @ApiModelProperty(value = "结单经纬度")
    @TableField("ti_end_point")
    private String tiEndPoint;     //结单经纬度

    @ApiModelProperty(value = "司机执行位置地址")
    @TableField("ct_start_address")
    private String ctStartAddress;     //司机执行位置地址

    @ApiModelProperty(value = "结束地址")
    @TableField("ct_end_address")
    private String ctEndAddress;     //结束地址

    @ApiModelProperty(value = "是否接单，0未接单，1已接单，2已完结")
    @TableField("ti_state")
    private String tiState;     //是否接单，0未接单，1已接单，2已完结

    @ApiModelProperty(value = "备注")
    @TableField("note")
    private String note;     //备注

    @ApiModelProperty(value = "是否发布 ：0:为发布 1 已发布")
    @TableField("ti_is_publish")
    private String tiIsPublish;     //是否发布 ：0:为发布 1 已发布

    @ApiModelProperty(value = "0:抢;1:派;2:自创并且抢")
    @TableField("ti_dispatch_type")
    private String tiDispatchType;     //0:抢;1:派;2:自创并且抢

    @ApiModelProperty(value = "承运费")
    @TableField("ti_price")
    private Double tiPrice;     //承运费

    @ApiModelProperty(value = "是否审核过 0：未审核1：审核")
    @TableField("ti_check_result")
    private String tiCheckResult;     //是否审核过 0：未审核1：审核

    @ApiModelProperty(value = "订单类型 城际（CJ)/机场专线（JC）")
    @TableField("ot_id")
    private String otId;     //订单类型 城际（CJ)/机场专线（JC）

    @ApiModelProperty(value = "订单类型名称 城际/机场接机/机场送机")
    @TableField("ot_name")
    private String otName;     //订单类型名称 城际/机场接机/机场送机

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;     //更新时间

    @ApiModelProperty(value = "更新人")
    @TableField("update_user")
    private String updateUser;     //更新人

    @ApiModelProperty(value = "首接时间")
    @TableField(exist = false)
    private String firstSendTime;//

    @ApiModelProperty(value = "线路名称")
    @TableField(exist = false)
    private String olName;//

    @ApiModelProperty(value = "驾驶员预选择任务单")
    @TableField("di_selected")
    private String diSelected;//

    @ApiModelProperty(value = "任务单金额")
    @TableField(exist = false)
    private BigDecimal sumFee;//
}
